﻿using ProjectShare;
using System;
using System.Collections.Generic;

namespace OMG.Fill.Vegetable.Model
{
    /// <summary>
    /// 填报基本信息T_Report查询条件
    /// </summary>
    public class ReportQuery : SearchBase
    {
        //查询条件，请自行删除不需要条件
        /// <summary>
        /// 报表编号
        /// </summary>
        public string Id { get; set; }
        /// <summary>
        /// 报表名称
        /// </summary>
        public string ReportName { get; set; }
        /// <summary>
        /// 报表代码
        /// </summary>
        public string ReportCode { get; set; }
        /// <summary>
        /// 填报年度
        /// </summary>
        public string FillInYear { get; set; }
        /// <summary>
        /// 填报时间类型
        /// </summary>
        public string TimesType { get; set; }
        /// <summary>
        /// 填报时间周期
        /// </summary>
        public string TimesCycle { get; set; }
        /// <summary>
        /// 填报所属行政区划
        /// </summary>
        public string AreaCode { get; set; }
        /// <summary>
        /// 报表状态
        /// </summary>
        public string ReportType { get; set; }
        /// <summary>
        /// 新增人
        /// </summary>
        public string AddUser { get; set; }
        /// <summary>
        /// 新增时间
        /// </summary>
        public DateTime? AddTime { get; set; }
        /// <summary>
        /// 修改人
        /// </summary>
        public string UpdateUser { get; set; }
        /// <summary>
        /// 修改时间
        /// </summary>
        public DateTime? UpdateTime { get; set; }
        /// <summary>
        /// 生成记录编号
        /// </summary>
        public string GenerateId { get; set; }
        /// <summary>
        /// 审核意见
        /// </summary>
        public string Opinion { get; set; }
        /// <summary>
        /// 报表当前状态
        /// </summary>
        public string Status { get; set; }
        /// <summary>
        /// 报表顺序
        /// </summary>
        public string Sort { get; set; }
    }

    public class ReportDataModel
    {
        public string ReportId { get; set; }
        public object list { get; set; }
    }
    public class reportExcelModel
    {
        /// <summary>
        /// 种类名称
        /// </summary>
        public string SortName { get; set; }
        /// <summary>
        /// 详细类别名称
        /// </summary>
        public string ItemName { get; set; }
        /// <summary>
        /// 单位
        /// </summary>
        public string Unit { get; set; }
        /// <summary>
        /// 数量
        /// </summary>
        public decimal? Quantity { get; set; }
    }
    public class ReportReview
    {
        //        select ReportName,
        //--审核失败
        //ISNULL(a.[0],0) as 'ReviewFalse' ,
        //--未填报
        //ISNULL(a.[1],0) as 'NotFillIn' ,
        //ISNULL(a.[2],0) as 'FillIn' ,
        //ISNULL(a.[3],0) as 'AlredayReport' ,
        //ISNULL(a.[4],0) as 'ReviewSuccess' ,
        //ISNULL(a.[5],0) as 'Lock' 
        // from(

        //select reportName, Status,

        // COUNT(1) RS from[T_Report] group by reportName,[Status]

        //) t
        // pivot(max(t.RS) FOR t.[Status] IN ([0] , [1], [2], [3], [4], [5])) a;


        /// <summary>
        /// 报表名称
        /// </summary>
        public string ReportName { get; set; }
        /// <summary>
        /// 报表顺序
        /// </summary>
        public string Sort { get; set; }
        /// <summary>
        /// 审核未通过
        /// </summary>
        public string ReviewFalse { get; set; }
        /// <summary>
        /// 未填报
        /// </summary>
        public string NotFillIn { get; set; }
        /// <summary>
        /// 已填报
        /// </summary>
        public string FillIn { get; set; }
        /// <summary>
        /// 已填报
        /// </summary>
        public string AlredayReport { get; set; }
        /// <summary>
        /// 审核通过
        /// </summary>
        public string ReviewSuccess { get; set; }
        /// <summary>
        /// 锁定
        /// </summary>
        public string Lock { get; set; }
    }
    public class VegNowModel : SearchBase
    {
        /// <summary>
        /// 地区---------地区编码值
        /// </summary>
        public string AreaCode { get; set; }
        /// <summary>
        /// 报表代码---------数据字典值
        /// </summary>
        public string ReportCode { get; set; }
        /// <summary>
        /// 年度---------数据字典值
        /// </summary>
        public string FillInYear { get; set; }
        /// <summary>
        /// 详情
        /// </summary>
        public string itemText { get; set; }
        /// <summary>
        /// 报表状态
        /// </summary>
        public string Status { get; set; }
        /// <summary>
        /// 季度值
        /// </summary>
        public string TimesCycle { get; set; }
        /// <summary>
        /// 种类编码
        /// </summary>
        public string ItemCode { get; set; }
        /// <summary>
        /// 组织类型
        /// </summary>
        public string OrganizeType { get; set; }
        /// <summary>
        /// 导出类型(地区、种类)
        /// </summary>
        public string ExportType { get; set; }
    }
}
